<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="js/vue.js"></script>
	</head>
	<body>
		<div id="app">
			<h2 v-for="item,index in classInfo">{{index+1}}、{{item}}</h2>
			<button type="button" @click="addMsg()">添加数据</button>
		</div>
	</body>
	<script>
		var app=new Vue({
			el:"#app",
			data:{
				classInfo:["java",'python',"Vue","SpringBoot","MySQL"]
			},
			methods:{
				addMsg:function(){
					this.classInfo.push("uni-app")
				}
			}
		})
	
	</script>
</html>
